package org.example.zpqy.controll;

import org.example.zpqy.bean.AppleOne;
import org.example.zpqy.bean.ApricotOne;
import org.example.zpqy.service.AppleOneService;
import org.example.zpqy.service.ApricotOneService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/apricotone")
public class ApricotOneController {
    private final ApricotOneService service;
    public ApricotOneController(ApricotOneService service) {
        this.service = service;
    }

    @GetMapping("/all")
    public List<ApricotOne> getAll() {
        return service.findAll();
    }
}